<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: lalahahababa
 * @LastEditTime: 2022-01-07 16:43:54
-->
<template>
  <!--1. 容器 -->
  <div ref="left1_container" style="height: 95%"></div>
</template>


<script>
import { Line } from '@antv/g2plot';

export default {
      data(){
        return{
          dataArr:[
            { year: '1', value: 25 },
  { year: '2', value: 40 },
  { year: '3', value: 50 },
  { year: '4', value: 100 },
  { year: '5', value: 60 },
  { year: '6', value: 40 },
        ]
        }
    },
    created(){


    },
    mounted(){
      this.initChart()

      },
      methods:{
        initChart() {
          const line =new Line(this.$refs.left1_container, {
            data:this.dataArr,
             xField: 'year',
             yField: 'value'
          });
          line.render();

        }

      }
}

</script>


<style scoped>

</style>